// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(59,2) == 0;
	question = "special";
	text1 = "You are far up into the mountains now, and the air is cold and thin. The ruts left by passing wagons are fainter here. Fewer merchants come up this far. And fewer will come, now that the road has been seeded with several minefields.";
	text2 = "Across the river to the southeast, you can see the ruins of a small village. Most of the buildings have been shattered by magical blasts and huge claws.";
	text3 = "It is not unsettled, though. Someone has claimed the settlement. You can see people, at least some of them serviles, patrolling the ruin.";
	action = SET_SDF 59 2 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = get_sdf(59,3) == 0;
	question = "special";
	text1 = "As you cross this narrow bridge, you can see that the ruins ahead have been settled by brigands. Many of them are serviles, but you can see humans too. They must be here with the blessing of the drakons.";
	text2 = "They easily spot you as you begin to cross the bridge. Guards shout an alarm, and all of the thugs grab the weapon that is closest to hand.";
	text3 = "You also hear one of them shout, _Call out Footracer! Quick!_";
	action = SET_SDF 59 3 1;

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "At first, you think that Footracer is casting a spell. Then you see that something is glowing very brightly through the front of her robe. Then the light fades, and a creation comes into being in front of her.";
	text2 = "Serviles are almost never able to make creations. Footracer has clearly been heavily augmented.";
	
begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Footracer stands next to the strange device in her chambers. Tendrils of energy and essence emerge from the thing and touch her chest.";
	text2 = "You watch, amazed, as the thing regenerates her.";
	
begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Footracer has been heavily damaged and is in great pain. However, her wounds don't seem to be affecting her. She moves as quickly and confidently as she did before. Her wounds seem to be healing over as you watch.";
	text2 = "This is a powerful and unusual piece of Shaping. You wonder how she is able to wield so much power. Or if she is drawing energy from somewhere else.";

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "Footracer's wounds start to wear her down. She waits for a rush of energy to restore her. It doesn't come. Something begins to glow inside the front of her robe, first white, then red.";
	text2 = "She gasps in agony. _No ... What ... What is happening? This ... It is ... malfunctioning ... How do I ..._";
	text3 = "And then her chest explodes. It is horrifying.";
	text4 = "The remaining pieces of Footracer fall to the ground.";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This is a Shaper's laboratory journal, abandoned here when the town was sacked.";
	text2 = "Most of the notes are pretty obscure observations regarding the crafting of crystals. You do find one interesting section:";
	text3 = "_A well-crafted girdle is invaluable to the aspiring Shaper. A garment of power so close to one's center can provide constant and powerful reinforcement. To this end, a perfected belt can be improved greatly with proper materials._";
	text4 = "_Reinforcing the belt with the skin of an ur-drakon can provide greater confidence when Shaping. Unmelting ice, on the other hand, provides calm and stability, helping in the healing arts._";
	text5 = "_Both substances, one after the other, can give a greater effect. Of course, order matters._";
	text6 = "_I have heard that there are other components that can augment such a girdle. Too much magic makes the item unstable, however. Two augmentations of such might are the most one garment can sustain._";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "This woman was a Shaper soldier. Probably a scout. The tattered remains of her chitin armor bear a small Shaper insignia.";
	text2 = "The brigands caught her and chained her here. She has been beaten to death, probably during questioning.";
	text3 = "Remembering what you learned back in town, you look for signs of the golden amulet. You find it in the crack between two stones under the filthy pallet. The scout hid it not long after she was captured. You take it.";
	code =
		if (gf(59,1) > 0)
			rs(3);
			else if ((gf(51,16) != 1) && (gf(61,25) != 1))
				rs(3);
				else {
					sf(59,1,1);
					set_spec_item(19,1);
					}
	break;

// Footracer
begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "A lone servile approaches you. She must be the leader of the brigands. All of the others clearly defer to her.";
	text2 = "She is a small creature. Almost frail. But she has a loaded baton, and she moves with a grace and fearlessness that makes her stand out effortlessly. There is something odd about her.";
	text3 = "When she gets close, she points her baton at you and begins to speak. She is definitely from the educated class of serviles. _I am Footracer. These are our lands, granted by the drakons. You are an intruder, and we do not welcome you._";
	text4 = "_We will give you a count of five. If you have not left by then, we will slay you._";

begintalknode 11;
	state = 10;
	nextstate = -1;
	condition = has_spec_item(2) > 0;
	question = "This amulet grants me safe passage. (Show it.)";
	text1 = "She doesn't lower her baton. _And we will not stop you. The road is nearby. That trinket will not let you enter these ruins. They are ours._";

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "What is this place?";
	text1 = "_It was a village called Bonepeak. By the time we settled here, all the original residents were dead or fled. We had nothing to do with its destruction._";

begintalknode 13;
	state = 10;
	nextstate = -1;
	condition = gf(51,16) == 1;
	question = "I am looking for a lost Shaper scout. Have you seen her?";
	text1 = "She looks nervous. _We have not seen this lost scout._";
	text2 = "She is lying. You're sure of it.";
	code =
		if (get_stat(20) < 5)
			rs(2);
	break;
	
begintalknode 14;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "I want to know more about you.";
	text1 = "The other brigands snort, but Footracer seems intrigued. She watches you closely. Without lowering the baton, she says, _I came here from far to the north._";
	text2 = "_The Shapers experimented on me. And then I escaped. And something about you ... about ..._ She trails off.";

begintalknode 15;
	state = 11;
	nextstate = 12;
	condition = 1;
	question = "What did they do to you?";
	text1 = "She raises the hand that isn't bearing the baton and pulls down the front of her robe slightly. You can see a little bit of the telltale bump left by one of Rawal's control tools.";
	text2 = "This tool is different from yours, though. It glows slightly.";

begintalknode 16;
	state = 12;
	nextstate = -1;
	condition = gf(100,8) > 0;
	question = "I had a tool like that. It has been removed.";
	text1 = "_Then you were one of Rawal's servants. I congratulate you on freeing yourself. However, you still cannot enter our lands._";

begintalknode 17;
	state = 12;
	nextstate = -1;
	condition = gf(100,8) == 0;
	question = "I have a control tool too. (Show it.)";
	text1 = "_Then you are a servant of Rawal. It makes me trust you less, not more. I am sure that Rawal would not be forgiving of a servant who ran away._";
	text2 = "_However, I will not slay you, though I take a risk by letting you live. I will let you leave our village. Quickly._";

begintalknode 18;
	state = 12;
	nextstate = 13;
	condition = 1;
	question = "That tool ... It was glowing.";
	text1 = "_It was an early variety. They wanted to see if it would function. And if it could be implanted without killing the receiver._";
	text2 = "_It was supposed to make me obedient and powerful, an effective and deadly servant. It did both. However, it did not keep me from fleeing. It helped._";

begintalknode 19;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "What powers did it give you?";
	text1 = "_I will not say. Just know that fighting me would be a grave error. I look frail. For quite a few warriors, their last mistake was thinking looks matched reality._";
	
begintalknode 20;
	state = 13;
	nextstate = 10;
	condition = 1;
	question = "Perhaps we can find a way to remove it.";
	text1 = "_And take away my power? Or kill me? No, I am content where I am. Enough talk. You need to decide whether to leave or die._";

begintalknode 21;
	state = 13;
	nextstate = -1;
	condition = 1;
	question = "And having a Shaper's creation in your chest doesn't bother the drakons?";
	text1 = "_No. I fascinate them. I suspect they want to make similar tools themselves. And I have proven, several times, my hatred for the Shapers who did this to me._";
	text2 = "_Enough talk. You need to decide whether to leave or die._";

begintalknode 22;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "I will leave.";
	text1 = "She nods. _Then the count begins. Leave quickly. Soon, if we see you on this side of the bridge, we will have to fight._";
	action = END_TALK;
	code =
		sf(59,6,1);
	break;
	
begintalknode 23;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "You will not stop me, servile. I go where I choose.";
	text1 = "_So we are fighting, then? I am not surprised._ She takes aim with her baton. _You will soon find that your blades hurt me, but they will not stop me._";
	action = END_TALK;
	code =
		sf(59,7,1);
		set_attitude(18,10);
	break;

//

begintalknode 30;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "There is a very odd device on the floor here. It's a crystal cylinder, held in an iron framework. The cylinder is full of glowing orange goo. The whole thing is only about three feet tall.";
	text2 = "When you get close to it, the orange goo starts to glow brightly. The control tool in your chest begins to wiggle nervously. This is extremely painful. You back away quickly.";
	text3 = "When you get close to it, the orange goo starts to glow brightly. You feel a strange, tickling sensation in your chest, where the control tool was.";
	text4 = "The wreckage of the odd device is still here.";
	code =
		clear_strings();
		if (gf(59,4) > 0)
			as(4);
			else {
				as(1);
				if (gf(100,8) == 0)
					as(2);
					else as(3);
				}
	break;

begintalknode 31;
	state = 30;
	nextstate = -1;
	condition = gf(59,4) == 0;
	question = "Try to operate the device.";
	text1 = "You look for controls, but you don't see any.";

begintalknode 32;
	state = 30;
	nextstate = -1;
	condition = gf(59,4) == 0;
	question = "Smash the device.";
	text1 = "You pick up a chunk of broken masonry and fling it at the device. It cracks the cylinder. The orange goo swiftly leaks out, making a huge mess on the floor.";
	text2 = "You pick up a chunk of broken masonry and fling it at the device. It strikes the cylinder but fails to crack it. A second attempt has no better luck. The device still has enough power to defend itself.";
	text3 = "You pick up a chunk of broken masonry and try to fling it at the device. Footracer shouts, leaps forward, and disrupts your aim. The stone flies wide.";
	action = END_TALK;
	code =
		clear_strings();
		if (gf(59,15) == 0)
			as(2);
			else if ((char_ok(18)) && (dist_to_nav_point(18,0) <= 5))
				as(3);
				else {
					as(1);
					sf(59,4,1);
					}
	break;

begintalknode 33;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "Leave.";
	text1 = "You leave the odd device alone.";
	action = END_TALK;


//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		